package com.chentf.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chentengfei
 * @desc ...
 * @date 2021-08-24 21:11:37
 */
@RestController
@Slf4j
public class ProductController {

    @Value("${server.port}")
    private int port;

    @GetMapping("/product")
    public String product(Integer id){
        log.info("id: {}",id);
        return "商品服务返回: "+id+",当前提供服务端口为: "+port;
    }
}
